package com.heima.search.controller;

import com.heima.common.dtos.Result;
import com.heima.model.search.dtos.UserSearchDto;
import com.heima.model.search.pojos.ApAssociateWords;
import com.heima.search.service.ApAssociateWordsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
/**
 * 搜索联想词
 */
@RestController
@RequestMapping("/api/article/assciate")
public class ApAssociateWordsController {
    @Autowired
    private ApAssociateWordsService apAssociateWordsService;

    @RequestMapping("/load")
    public Result<List<ApAssociateWords>> loadWords(@RequestBody UserSearchDto dto){
        return apAssociateWordsService.loadWords(dto);
    }
}
